<template>
  <van-tabbar fixed v-model="active">
    <van-tabbar-item v-for="(item, index) in  tablist " :key="index" :icon="require('@/assets/icon/' + item.icon + '.svg')" @click.stop="toPage(item.path)">{{ item.title }}</van-tabbar-item>
  </van-tabbar>
</template>

<script>
export default {
  name: "",
  mixins: [],
  components: {},
  props: {
    activeTab: {
      type: Number,
      default: 0,
    },
    list: {
      type: Array,
      default: () => {
        return [];
      },
    },
  },
  data() {
    return {
      active: this.activeTab,
      tablist: [
        { title: "首页", icon: "home", path: "/dashboard", name: "dashboard" },
        { title: "工作台", icon: "staging", path: "/home", name: "home" },
        {
          title: "功能",
          icon: "function",
          path: "",
          name: "",
        },
        { title: "个人中心", icon: "my", path: "/mine", name: "mine" },
      ],
    };
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    toPage(path) {
      this.$router.push({
        path: path,
      });
    },
  },
};
</script>

<style scoped lang="less"></style>
